<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ page import="com.google.appengine.api.users.UserService" %>
<%@ page import="com.google.appengine.api.users.UserServiceFactory" %>
   
   
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" type="text/css" href="term-structure.css">
<title>term structure of interest rates</title>

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
<script type="text/javascript">
function showMenu() {
	if(document.getElementById("menu").style.display=="inline") {
		document.getElementById("menu").style.display="none";
	} else {
		document.getElementById("menu").style.display="inline";
	}
}
</script>
</head>

<body>
<div class="user"><%
String thisURL = request.getRequestURI();
UserService userService = UserServiceFactory.getUserService();
if (userService.isUserLoggedIn()) {
	%><a href="#" onClick="showMenu();"><%=userService.getCurrentUser().getNickname()%></a><%
} else {
	%><a href="<%=userService.createLoginURL(thisURL)%>">Log In</a><%
}
%></div>
<div class="menu" id="menu">
<a href="<%=userService.createLogoutURL(thisURL)%>">Log Out</a><br />
<a href="instruments.jsp">Instruments</a><br />
<a href="term-structures.jsp">Term Structures</a><br />
<a href="prices.jsp">Prices</a>
</div>
<p></p>